#pragma once

#include "exports.hpp"
#include "DataProcessor.h"
#include "UrlWriter.hpp"




class CRAWLER_API CoreDataProcessor
	: public DataProcessor
{
public:

	typedef boost::shared_ptr<CoreDataProcessor>         Ptr;
	typedef boost::shared_ptr<const CoreDataProcessor>   const_Ptr;

private:

	UrlWriter::Ptr   m_urlProvider;
	QRegExp          m_rx;

public:

	CoreDataProcessor();
	virtual ~CoreDataProcessor();



	/**
	 * Get the name of the plugin.
	 */
	virtual QString name() const;

	/**
	 * Get a formatted version string.
	 */
	virtual QString version() const;

	/**
	 * Get a description about the plugin.
	 */
	virtual QString description() const;



	/**
	 * Attach the given UrlProvider to this processor.
	 */
	void attach(UrlWriter::Ptr urlProvider);

protected:

	/**
	 * Process the given data.
	 */
	virtual void process(const Reply &reply);
};
///////////////////////////////////////////////////////////////////////////////////////////////////
